use crate::PA;
use init_proc::{io, io_group};

pub struct Pin<const PIN: u8>;

#[io(PA15)]
pub struct TestPin;

fn test() {
    PA.moder.modify(|_, w| {
        w.moder0().output()
        .moder1().input()
        .moder2().analog()
        .moder3().alternate()
    });
    PA.otyper.modify(|_, w| {
        w.ot0().push_pull()
        .ot1().open_drain()
    });
    PA.pupdr.modify(|_, w| {
        w.pupdr0().floating()
        .pupdr1().pull_up()
        .pupdr2().pull_down()
    });
    PA.ospeedr.modify(|_, w| {
        w.ospeedr0().very_high_speed()
    });
    PA.afrl.modify(|_, w| {
        w.afrl0().af0()
    });
}

#[io_group(
    CC_PD0_OUT_PP_FLOAT +
    TX_PA9_AF_PP_FLOAT_7 +
    RX_PA10_AF_PP_FLOAT_7 +
    P3_PA5_IN_UP +
    P4_PC3_ANALOG
)]
pub struct CmdUart;


